<% if @user %>
<%if @user.anonymous==true -%>
<table>
	<tr>
		<td><%=image_tag "/images/nil.gif",:alt=>"注意"%></td>
		<td class="medgray" valign="center"><strong>对不起，该用户没有公开其个人资料，您可以<%=link_to_remote "发送问候", :url=>{:controller=>"view", :action=>"showmessage", :id=>@user.id},:loading => "Element.show('indicator')",:complete => "Element.hide('indicator')",:update=>"message" %>。</strong></td>
	</tr>
</table>
<%else -%>
<table>
	<tr>
		<td width="120" height="31" align="center"
			background="/images/lantou.gif" class="medgray">用户资料<%=image_tag "/images/left.gif" , :alt=>"用户资料"%></td>
		<td width="440" background="/images/lantou.gif">&nbsp;</td>
		<td width="120" background="/images/lantou.gif"  align="right"><a href="#" onclick="history.go(-1)">返回上页</a></td>
	</tr>
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>
</table>
<table width="600" border="0" cellpadding="0" cellspacing="0"
	class="medblack" align="center">
	<tr>
		<td rowspan="11" width="120" valign="top">
		<table width="61" height="61">
			<tr>
				<td align="center" valign="top"><%=showpicture(@user)%></td>
			</tr>
			<tr>
				<td align="center"><strong><%=viewuser_menu(@user) %></strong></td>
			</tr>
			<%unless @user.id==session[:user_id]-%>
			<tr>
			<td><%=image_tag "/images/mail.gif",:alt=>"写信问候"%></td>
			</tr>
			<tr>
				<td align="center"><strong><%=link_to_remote "写信问候", :url=>{:controller=>"view", :action=>"showmessage", :id=>@user.id},:loading => "Element.show('indicator')",:complete => "Element.hide('indicator')",:update=>"message"%></strong></td>
			</tr>
			<%end-%>
		</table>
		</td>
		<td width="100">
		<li>用户名：</li>
		</td>
		<td class="medgray" width="140"><%=h(@user.name)%></td>
		<td width="100">
		<li>工作年份：</li>
		</td>
		<td class="medgray" width="140"><%=@user.Person.experience%>年</td>
	</tr>
	<tr>
		<td colspan="4">&nbsp;</td>
	</tr>
	<tr>
		<td>
		<li>性别：</li>
		</td>
		<td class="medgray"><%=show_sex(@user.Person.sex)%></td>
		<td>
		<li>生日：</li>
		</td>
		<td class="medgray"><%=@user.Person.birthday.to_date%></td>
	</tr>
	<tr>
		<td colspan="4">&nbsp;</td>
	</tr>
	<tr>
		<td>
		<li>教育背景：</li>
		</td>
		<td class="medgray"><%=@user.Person.Education.cname%></td>
		<td>
		<li>海外经验：</li>
		</td>
		<td class="medgray"><%=@user.Person.Oversea.cname%></td>
	</tr>
	<tr>
		<td colspan="4">&nbsp;</td>
	</tr>
	<tr>
		<td>
		<li>电子邮件：</li>
		</td>
		<td class="medgray"><%=mail_to h(@user.email)%></td>
		<td>
		<li>注册日期：</li>
		</td>
		<td class="medgray"><%=@user.created_time.to_date%></td>
	</tr>
	<tr>
		<td colspan="4">&nbsp;</td>
	</tr>
	<tr>
		<td>
		<li>职业目标：</li>
		</td>
		<td class="medgray" colspan="3"><%=h(@user.objects)%></td>
	</tr>
	<tr>
		<td colspan="4">&nbsp;</td>
	</tr>
	<tr>
		<td>
		<li>兴趣爱好：</li>
		</td>
		<td class="medgray" colspan="3"><%=h(@user.interests)%></td>
	</tr>
	<tr>
		<td height="30">&nbsp;</td>
		<td align="right" colspan="4"><span id='indicator'
			style="display:none"><%=image_tag("/images/progress.gif")%></span></td>
	</tr>
</table>
<%end -%>
<div id="message"></div>
<% else %>
  <table border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td><%=image_tag "/images/nil.gif",:alt=>"注意"%></td>
		<td class="medgray" valign="center"><strong>对不起，该用户资料不存在。</strong></td>
	</tr>
</table>
<% end %>

